package com.suineg.pms.service.commoms;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.suineg.pms.entity.commons.SystemInfo;
import com.suineg.pms.repository.commons.SystemInfoDao;

/**
 *
 *@author Suine
 */
@Service
@Transactional(readOnly = true)
public class SystemInfoService {
	/** 日志输出对象 */
	protected final Logger logger = LoggerFactory.getLogger(getClass());
	@Autowired
	private SystemInfoDao dao;
	
	public List<SystemInfo> findByCode(String code){
		return dao.findByCode(code);
	}
	
	public List<SystemInfo> findByName(String name){
		return dao.findByName(name);
	}
	
	public SystemInfo get(Long id){
		return dao.findOne(id);
	}
	@Transactional(readOnly = false)
	public void save(SystemInfo info){
		dao.save(info);
	}
	@Transactional(readOnly = false)
	public void delete(Long id){
		dao.delete(id);
	}

}

